#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
void reserve_arr(int arr[],int a)
{
	int left = 0;
	int right = a - 1;
	while (left <= right)
	{
		int temp = arr[left];
		arr[left] = arr[right];
		arr[right] = temp;
		left++;
		right--;
	}
}
void print(int arr[], int a)
{
	for (int i = 0; i < a; i++)
	{
		printf("%-3d", arr[i]);
	}
	printf("\n");
}
int main()
{
	int arr[8] = { 1,2,3,4,5,6,7,8 };
	print(arr, 8);
	reserve_arr(arr, 8);
	print(arr, 8);
	return 0;
}